﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace ZHDJ.MobileInterface.html
{
    public partial class InformationDetail : System.Web.UI.Page
    { 
        public string InfoType
        {
            get
            {
                return Request.QueryString["InfoType"] ?? "";
            }
        }

        public string InfoID
        {
            get
            {
                return Request.QueryString["InfoID"] ?? "";
            }
        }

        public string InfoTitle
        {
            get;
            set;
        }

        public string UsrName
        {
            get;
            set;
        }

        public string InfoTime
        {
            get;
            set;
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            DataSet ds = InterfaceHelper.GetInformationDetail(InfoID, InfoType);
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                InfoTitle = ds.Tables[0].Rows[0]["infoTitle"].ToString();
                UsrName = CommonUtils.ChangeBranchName(ds.Tables[0].Rows[0]["UserName"].ToString());
                try
                {
                    InfoTime = Convert.ToDateTime(ds.Tables[0].Rows[0]["InfoTime"]).ToString("yyyy-MM-dd");
                }
                catch
                {
                    InfoTime = "";
                }

                dt.InnerHtml = ds.Tables[0].Rows[0]["content"].ToString();

                //InterfaceHelper.UpdateInfoViews(InfoID, InfoType);
            }
        }
    }
}